﻿using System;
using System.IO;

namespace Silent.Data.Serialization
{
    public interface ISerializationService
    {
        void Serialize(Type type, object source, string filename);
        void Serialize(Type type, object source, Stream stream);
        object Deserialize(Type type, string filename);
        object Deserialize(Type type, Stream source);
    }

    public interface ISerializationServiceGeneric
    {
        void Serialize<T>(T source, string filename);
        void Serialize<T>(T source, Stream stream);
        T Deserialize<T>(string filename);
        T Deserialize<T>(Stream source);
    }

    public enum SerializationType
    {
        Xml,
        Json,
        Binary
    }
}